package secloud

type ClientConfig struct {
	ServerUrl string
}

type Client struct {
	Config       *ClientConfig
	AuthEntrance *AuthEntrance
}

type AuthClient struct {
	CipherClient *CipherClient
	KmsClient    *KmsClient
}

// NewAPIClient returns a client to call apis, ClientConfig contains ServerUrl
func NewAPIClient(config *ClientConfig) *Client {
	cfg := verifyAndStandardizeConfig(config)
	setBaseUrl(cfg.ServerUrl)

	return &Client{
		Config:       cfg,
		AuthEntrance: NewAuthEntrance(),
	}
}

// NewConfiguration returns a config that contains ServerUrl
func NewConfiguration(url string) *ClientConfig {
	return &ClientConfig{ServerUrl: url}
}
